<?php

namespace App\Models;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class GovernmentInfo
 * *
 * @property $id  自增ID
 * @property $title  政务标题
 * @property $content  政务内容
 * @property $publisher_uid  发布者uid
 * @property $created_at
 * @property $updated_at
 * @property $deleted_at
 *
 * @package  App\Models
 * @mixin \Illuminate\Database\Eloquent\Builder
 */
class GovernmentInfo extends Model
{
    use SoftDeletes;

    protected $table = 'government_infos';

    protected $fillable = ['id', 'title', 'content', 'publisher_uid'];

    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
    }
}
